package com.hduong.springcloud.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <h3>spring-cloud-demo-parent</h3>
 * <p>commenResult</p>
 *
 * @author : hduong
 * @version : 1.0
 * @date : 2020-03-23 09:56
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> {
    private T t;
    private String message;
    private Integer code;

    public CommonResult(T data) {
        this(data, "操作成功", 200);
    }
    public CommonResult(String message, Integer code) {
        this(null, message, code);
    }

}
